home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / hardware / rsux.exe / RSU.TXT < prev    next >
Text File  |  1993-11-28  |  41KB  |  1,216 lines

  1.                                
  2.                             RSU 1.2
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                                
  14.        Remote Software Update for Networks-Documentation
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.                                
  36.      Copyright ╕ 1993 Burkhard Daniel & Hans-Georg Michna
  37.                                
  38.                        Table of Contents
  39.  
  40.  
  41.  
  42.  
  43.      Brief Command Overview                            3
  44.      Licensing and Support                             4
  45.      Introduction                                      5
  46.      How RSU Works                                     6
  47.      Installing RSU                                    6
  48.         RSU Server Preparation                         6
  49.         Workstation Preparation                        7
  50.      The RSU Development Cycle                         7
  51.         Steps in the RSU Development Cycle             7
  52.         Prepare an RSU Test Workstation                8
  53.         Create and Test the New Module                 8
  54.         Protect Users From Your Tests                  8
  55.         Upload the New Module to the RSU Server        9
  56.         Adapt the RSU Program                          9
  57.         Test the New RSU Program                       9
  58.         Activate the New RSU Program                   9
  59.      Programming RSU                                  10
  60.         General Rules                                 10
  61.         Sample RSU Program                            10
  62.         Execution Sequence                            11
  63.      Alphabetical List of Commands                    11
  64.         General Command Syntax                        11
  65.         Sections                                      12
  66.         Environment Variables                         12
  67.         DOS Commands                                  13
  68.         Echo                                          13
  69.         Goto                                          13
  70.         If                                            13
  71.         IniAddLine                                    15
  72.         IniChangeLine                                 15
  73.         IniCopyLine                                   16
  74.         IniCopySection                                16
  75.         IniDeleteLine                                 16
  76.         IniDeleteSection                              17
  77.         SynchronizeDir                                17
  78.  
  79.  
  80.                                
  81.                      RSU.DOC [24] 8.10.93
  82.  
  83.  
  84.  
  85. Brief Command Overview
  86.  
  87. In the following text each group of syntax lines is followed by
  88. one or more example lines which are indented.
  89.  
  90. RSU <program file name>
  91. RSU.EXE <program file name>
  92. RSU <program file name> /debug
  93. RSU.EXE <program file name> /debug
  94.     f:
  95.     cd \rsu
  96.     rsu rsu.prg
  97.  
  98. Echo <text>
  99.     Echo RSU is now installing new video drivers...
  100.  
  101. Goto <label>
  102.     Goto Finish
  103.  
  104. <label>:
  105.     Finish:
  106.  
  107. If [Not] <condition> Then
  108.     <command>
  109.     ...
  110. [Else
  111.     <command>
  112.     ...]
  113. End If
  114.  
  115. If [Not] <condition> Then
  116.     <command>
  117.     ...
  118. [Else
  119.     <command>
  120.     ...]
  121. EndIf
  122.  
  123. <condition> = { <text 1> <comparison operator> <text 2> | Exist
  124.     <filename> | <filename 1> Equal <filename 2> } |
  125.     Bios(<hexadr>-<hexadr>) = <text>
  126.  
  127. <comparison operator> = { < | <= | = | >= | > | <> }
  128.  
  129. <hexadr> = 0 .. FFFF
  130.  
  131.     If Bios(F000-F100) = AMI Then
  132.       Echo This computer has an AMI Bios.
  133.     End If
  134.     If Not %USER% = SUPERVISOR Then
  135.      Goto Finish
  136.     End If
  137.     ...
  138.     Finish:
  139.     
  140.     (The example above also shows how to insert an environment
  141.     variable.)
  142.  
  143. IniAddLine <ini file> [<section name>] <variable name>=<text>
  144.     IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=VPD.386
  145.     IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=NETWARE.386
  146.  
  147. IniChangeLine <ini file> [<section name>] <variable>=<text>
  148.     IniChangeLine C:\WIN31\WIN.INI [windows] load=NWPOPUP.EXE
  149.     IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=%USER%
  150.     
  151.     (The second example above also shows how to insert an
  152.     environment variable.)
  153.  
  154. IniCopyLine <source ini file> <target ini file> [<section
  155.     name>] <variable>
  156.     IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI
  157.       [windows] load
  158.     IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI
  159.       [windows] load=
  160.  
  161. IniCopySection <source ini file> <target ini file> [<section
  162.     name>]
  163.     IniCopySection F:\RSU\WSIMAGE\WIN31\WIN.INI
  164.       C:\WIN31\WIN.INI [HPPCL5A,LPT1:]
  165.  
  166. IniDeleteLine <ini file> [<section name>] <variable>
  167.     IniDeleteLine C:\WIN31\WIN.INI [mail] Polling
  168.     IniDeleteLine C:\WIN31\WIN.INI [mail] Polling=
  169.  
  170. IniDeleteSection <ini file> [<section name>]
  171.     IniDeleteSection C:\WIN31\WIN.INI [Microsoft Word]
  172.  
  173. SynchronizeDir <source directory> <target directory> [/D] [{ /O
  174.     | /C }] [/A] [/S]
  175.     SynchronizeDir F:\RSU\WSIMAGE\U C:\U /D /O /A /S
  176.     SynchronizeDir F:\RSU\WSIMAGE\DOS C:\DOS /O /A
  177.  
  178. SynchronizeDir switches:
  179.     
  180.     /D Delete files from the target directory if they don't
  181.        exist in the source directory.
  182.     
  183.     /A Add files to the target directory if they are not there
  184.        already.
  185.     
  186.     /O Overwrite files in the target directory if they also
  187.        exist in the source directory but are different (have
  188.        different size, date or time). This switch may not be
  189.        used together with the /C switch.
  190.     
  191.     /C Conflict management. This switch may not be used
  192.        together with the /O switch. If a file name exists in
  193.        both source and target directories but with different
  194.        size, date or time, then this is considered a conflict
  195.        and both files are retained with different file names
  196.        (see full documentation).
  197.     
  198.     /S Synchronize all subdirectories also.
  199.  
  200.  
  201.  
  202. Licensing and Support
  203.  
  204. RSU including its documentation files is Copyright  1992, 1993
  205. Burkhard Daniel and Hans-Georg Michna. It is distributed under
  206. the Shareware concept. Its use on isolated PCs, for example to
  207. change settings in WIN.INI through batch files without the
  208. involvement of any network file server is free, even if the
  209. computer is connected to a network. As soon as RSU is used to
  210. copy files from a network file server to a user's local storage
  211. or to copy any parts of files of the Windows INI type from a
  212. network file server, however, its free use is restricted to a
  213. 30 day trial period. After that the shareware fee has to be
  214. paid through CompuServe's SWREG if the program is still used.
  215.  
  216. The fee is US $50.00 or DM 85 (German Mark) for each group of
  217. up to 100 users. In other words, if the program is used for 1
  218. to 100 users, the fee is US $50.00 or DM 85.00. If it is used
  219. for 101 to 200 users, the fee is US $100.00 or DM 170.00, for
  220. 201 to 300 users US $150.00 or DM 255.00 and so on. The DM
  221. (German Mark) price may change in a future version, if the
  222. exchange rate changes considerably. Future enhanced versions of
  223. RSU may be more expensive.
  224.  
  225. The program contains no technical means to enforce payment
  226. other than noting the requirement on screen when RSU is
  227. started.
  228.  
  229. To pay the fee log on to CompuServe and enter the command: GO
  230. SWREG. Search for the keyword RSU and register according to the
  231. choices you get on screen.
  232.  
  233. Alternatively, send a check to one of the following addresses.
  234.  
  235. USA:        Mark Jordan, 5A Hadley Court, Edwardsville
  236.         IL 62025-2479
  237. Europe:        Hans-Georg Michna, Notingerweg 42
  238.         D-85521 Ottobrunn
  239.  
  240.         In Europe use a Eurocheque for DM 85 or
  241.         equivalent per 100 users.
  242.  
  243. The program may be freely distributed as long as the files stay
  244. together unaltered and packed in one file using an archiving
  245. program like PKZIP, LHA or similar. It is not allowed to add
  246. any other files other than minor additions that do not exceed
  247. the size of the original files. It is not allowed to distribute
  248. RSU as part of another program or package because we fear that
  249. this might look as if RSU may no longer require its shareware
  250. fee payment which it always does according to the rules
  251. outlined above.
  252.  
  253. Through CompuServe Mail you can reach Hans-Georg Michna
  254. 74776,2361 if you have questions, remarks or proposals for
  255. future enhancements of RSU. You can also reach him through
  256. Internet mail: 74776.2361@compuserve.com
  257.  
  258. Disclaimer:  At the present state of software technology it is
  259. not possible to create error-free software. RSU may contain
  260. errors. Anybody using it should take precautions like creating
  261. safety backups in case a defect causes damage to any computer
  262. or data. The authors of RSU can under no circumstances be held
  263. responsible for any damage.
  264.  
  265. Microsoft⌐ is a trademark of Microsoft, Inc.
  266.  
  267.  
  268.  
  269. Introduction
  270.  
  271. RSU (Remote Software Update) is a program that updates the
  272. software on many individual workstation1 PCs connected to a
  273. file server. The file server, when equipped with RSU, becomes
  274. an RSU server.
  275.  
  276. The RSU program does not run on the RSU server, however. It
  277. runs only on the workstations. The RSU server consists only of
  278. subdirectories and files on the file server.
  279.  
  280.                                
  281.                                
  282.                                
  283.                     Sample RSU installation
  284.  
  285.  
  286. The fundamental idea is that all workstation configurations are
  287. stored on the RSU server. RSU then copies the appropriate
  288. modules to each workstation while retaining individual settings
  289. or individual software on the workstations.
  290.  
  291. The file server used for RSU does not have to be the same file
  292. server that is used for normal work. It is necessary, of
  293. course, that users log in to the RSU server from time to time
  294. to get the topical remote software update.
  295.  
  296. Since the file server does not usually run DOS a separate RSU
  297. test workstation is needed to develop and test the
  298. configurations. If testing on different hardware is needed then
  299. one RSU test workstation is needed for each hardware setup. RSU
  300. test workstations can be used for other work when they are not
  301. being used for RSU development. Their RSU related configuration
  302. has to be totally reset, however, before it is used for
  303. testing. RSU can
  304.  
  305. - copy predetermined files from the RSU server to the
  306.   workstations,
  307.  
  308. - change the contents of subdirectories, even whole
  309.   subdirectory trees, on the workstation PCs such that they
  310.   become equal to their parents on the RSU server, by adding,
  311.   deleting or overwriting files on the target PC,
  312.  
  313. - add, change, copy or delete certain sections or certain lines
  314.   in INI files like WIN.INI and SYSTEM.INI,
  315.  
  316. - copy or delete sections in text files like AUTOEXEC.BAT and
  317.   CONFIG.SYS,
  318.  
  319. - find out whether each workstation is already up to date and
  320.   skip the updating process.
  321.  
  322.  
  323.  
  324. How RSU Works
  325.  
  326. Since the file server or any program running on any workstation
  327. has normally no access to any local disks the main RSU program
  328. has to run on each workstation to work its magic. The most
  329. convenient way to achieve this is to run it each time any user
  330. logs in to the RSU server.2
  331.  
  332. This can be achieved in different ways on different operating
  333. systems. On a Novell network, for example, a command can be
  334. called up after the system login script finishes, by using the
  335. Novell EXIT "<command>" syntax or by calling it in the middle
  336. of the login script with the # syntax. See the manual of your
  337. network for details. RSU can be called from a DOS batch file.
  338. It has one command line parameter which is the path of the RSU
  339. program file. Example:
  340.  
  341.     f:\rsu\rsu.exe  f:\rsu\rsu.prg
  342.  
  343.  
  344. RSU.EXE will execute the RSU program file. Files are typically
  345. copied from the RSU server to the local disk or modified on the
  346. local disk. Instead of the local disk the individual user
  347. storage space may also be on a file server. In this case each
  348. user's private storage should be mapped to a drive like U:,
  349. such that each user sees his private storage area when he
  350. refers to U:.
  351.  
  352.  
  353.  
  354. Installing RSU
  355.  
  356.  
  357. RSU Server Preparation
  358.  
  359. Each file server can be a RSU server. The basic method is to
  360. keep a mirror image of a workstation in a RSU server directory,
  361. for example in F:\RSU\WSIMAGE. There can be several such
  362. directories for several different configurations. The
  363. configurations have to be created and tested on test
  364. workstations, then copied to the RSU server. In addition the
  365. RSU server needs one other directory with read-only access for
  366. RSU.EXE and the RSU program file (example: RSU.PRG, example of
  367. RSU read-only directory: F:\RSU).
  368.  
  369. The management of more than one workstation configuration can
  370. easily achieved by creating small signal files on the different
  371. workstations which indicate the configuration type. The
  372. existence of any of these signal files can then be queried by a
  373. simple "If Exist" command. Another method is the BIOS scan
  374. which can be performed by a utility like PC Magazine's STRINGS
  375. or by a small Basic program, for example. Thus the BIOS version
  376. of the computer or, for example, of the display adapter can be
  377. determined automatically and the appropriate configuration
  378. installed without any manual intervention.
  379.  
  380.  
  381. Workstation Preparation
  382.  
  383. Before installing RSU you have to make sure that all
  384. workstations connected to the RSU server have a valid minimal
  385. installation. The absolute minimum would be an installed DOS
  386. and the minimal network drivers to be able to connect to the
  387. server.
  388.  
  389. It is recommended that you have an initial workstation setup
  390. procedure to erase all RSU related directories and files from a
  391. workstation and recreate the whole minimal setup from scratch.
  392. This could be done with a batch file like INSTALL.BAT on the
  393. RSU server. This will be very useful for users if they have
  394. somehow destroyed vital files on their workstation. They will
  395. then have a way to get up and running again if everything else
  396. fails and no service person is available.
  397.  
  398. It is also conceivable to use RSU to such an extent that each
  399. and every file on the workstation is covered by RSU. This would
  400. have the advantage that every workstation would recover from
  401. any loss or mutilation of files automatically when logging on
  402. to the RSU server. But this will often not be practicable for
  403. performance or other reasons.
  404.  
  405. RSU will run inside Windows and Windows NT. Note, however, that
  406. Windows or Windows NT may keep certain files open, such that
  407. these files themselves cannot be copied or updated. On Windows
  408. NT, RSU, like many other DOS programs, requires read and write
  409. access to the file CMOS.RAM in the SYSTEM32 directory.
  410.  
  411.  
  412.  
  413. The RSU Development Cycle
  414.  
  415.  
  416. Steps in the RSU Development Cycle
  417.  
  418. The RSU development cycle is the process of developing a new
  419. configuration. Frequently this will just be a small change in
  420. an existing configuration, but it could also be an entirely new
  421. configuration for a new type of workstation, for example.
  422. Development proceeds in these steps:
  423.  
  424. 1. Prepare a RSU test workstation by making it equivalent to
  425.    the topical RSU update level.
  426.  
  427. 2. Create and test a new configuration or modify the existing
  428.    one on a test workstation.
  429.  
  430. 3. Temporarily protect users from your RSU server changes.
  431.  
  432. 4. Upload (copy) the new workstation configuration to the RSU
  433.    server or modify the existing one on the RSU server.
  434.  
  435. 5. If necessary, adapt the RSU program file (example: RSU.PRG).
  436.  
  437. 6. Test the new RSU setup on a test workstation.
  438.  
  439. 7. Activate the new setup, such that it gets installed on all
  440.    target workstation PCs (undo step 3).
  441.  
  442. In many cases this development cycle can be shortened by
  443. skipping certain actions if their effect is minimal or if the
  444. number of workstations is low enough such that some risk can be
  445. taken.
  446.  
  447. The following sections describe these actions in detail.
  448.  
  449.  
  450. Prepare an RSU Test Workstation
  451.  
  452. First you have to make sure that your RSU test workstation is
  453. equal to a topical workstation elsewhere in the network. If the
  454. test workstation has not been used for anything that might have
  455. altered the files and directories concerned then it can be used
  456. right away. If not, and whenever there are any doubts, the test
  457. workstation should be installed fresh from the RSU server. It
  458. is a good precaution to log in once after installation and
  459. obtain the latest changes from the RSU server to make sure they
  460. are included in the workstation image on the RSU server.
  461.  
  462. The RSU update level information can be stored in any file for
  463. each workstation. You only have to edit this file or touch it
  464. such that the file date or time is changed to force an update.
  465.  
  466. Start the RSU program, normally by logging in to the RSU
  467. server. The test workstation should automatically be updated to
  468. the topical update level. After the test workstation is up to
  469. the present standard you can now make the desired changes.
  470.  
  471.  
  472. Create and Test the New Module
  473.  
  474. Now you can make the desired modification on the test machine
  475. only. Test thoroughly, since all your users who use that module
  476. will depend on your conscientiousness.
  477.  
  478.  
  479. Protect Users From Your Tests
  480.  
  481. As soon as you touch the RSU server all users who happen to use
  482. the server will receive any modification. Therefore you have to
  483. make sure that this does not happen.
  484.  
  485. There are several ways to protect users:
  486.  
  487. 1. Deactivate the whole RSU server until you are done with all
  488.    changes. One way is to rename the RSU program. Without it
  489.    RSU will not be able to do anything. Another is to activate
  490.    a jump over the RSU part of the controlling batch file.
  491.  
  492. 2. Leave the RSU server running and create a second RSU server
  493.    at least for the module you intend to work on. This is not
  494.    quite so difficult as it sounds. It may be necessary for
  495.    bigger changes that require some time to work out.
  496.  
  497. 3. If you are making a very small change and you are absolutely
  498.    sure that even a mistake can do no harm you may risk to work
  499.    on the hot system. But be careful! Depending on the number
  500.    of workstations and likelihood of a login you should be able
  501.    to make the change within seconds. This might be viable if
  502.    you just want to change a few files, for example. Again do
  503.    not forget to change the date and time of the RSU update
  504.    level file afterwards, so all users get a new update when
  505.    they log in.
  506.  
  507.  
  508. Upload the New Module to the RSU Server
  509.  
  510. After you have tested the new configuration thoroughly on your
  511. test machine you can now copy the modifications to the RSU
  512. server (for example to the F:\RSU\WSIMAGE directory and its
  513. subdirectories). It is useful to have a program that can detect
  514. the difference between files on two drives like the Norton
  515. CommanderT with its "Compare directories" command. In any case
  516. be sure to copy all changes from the test machine to the RSU
  517. server.
  518.  
  519.  
  520. Adapt the RSU Program
  521.  
  522. Now change the RSU program (example: F:\RSU\RSU.PRG) if
  523. necessary. The modified RSU program should be able to copy all
  524. modifications from the RSU server area to any workstation PC.
  525.  
  526. If you make changes to files by means of direct manipulation by
  527. the RSU program, for example with IniChangeLine, be sure to
  528. make those changes on the original files on the RSU server as
  529. well, such that users who do an install from scratch also get
  530. them immediately before they receive the next RSU update.
  531.  
  532.  
  533. Test the New RSU Program
  534.  
  535. After the update is entirely in place but not yet activated you
  536. should test it before releasing it to all users. For this you
  537. either need a second test machine or you have to reset the
  538. first one to the previous configuration which is still standard
  539. for all other users.
  540.  
  541. Then you have to make sure that the new update affects only the
  542. test machine but not yet all the other users. There are several
  543. ways to achieve this. The easiest is to modify the RSU program
  544. file such that only the testing user gets the update. Example:
  545.     
  546.     ...
  547.     If %USER% <> SUPERVISOR Then
  548.      Goto Not_yet
  549.     End If
  550.     rem   Enter other RSU commands here
  551.     Not_yet:
  552.     ...
  553.  
  554.  
  555. This sample batch file fragment presumes that the network user
  556. name was written into the environment variable USER, for
  557. example with the Novell Netware login script command:
  558.  
  559.     DOS SET USER="%USER_ID".
  560.  
  561. Check whether the update is correct. You may have to test each
  562. configuration separately if there are several.
  563.  
  564.  
  565. Activate the New RSU Program
  566.  
  567. Finally, after you have convinced yourself that the new update
  568. works correctly, you can release it to all users by removing
  569. any blocking commands you might have inserted. From that very
  570. moment all users who log on will receive the update.
  571.  
  572.  
  573.  
  574. Programming RSU
  575.  
  576.  
  577. General Rules
  578.  
  579. RSU is an interpreter for the RSU control language which
  580. strongly resembles BASIC and, to some extent, DOS batch files.
  581. The RSU program is the file which controls all RSU operations.
  582. It should reside on the RSU server, for example as
  583. F:\RSU\RSU.PRG. All users should have read-only access to it.
  584.  
  585. RSU is started from DOS with either of the following commands:
  586.  
  587.     RSU <program file name>
  588.     RSU.EXE <program file name>
  589.     RSU <program file name> /debug
  590.     RSU.EXE <program file name> /debug
  591.  
  592. The /debug switch produces a display of all commands, as they
  593. are executed.
  594.  
  595. As long as the program is unregistered, it always displays a
  596. shareware registration screen first. Apart from this, however,
  597. the program is fully functional and can be tested with all
  598. functions for 30 days. After that time the program must be
  599. registered for further legal use.
  600.  
  601.  
  602. Sample RSU Program
  603.  
  604. This is an example of an RSU.PRG file:
  605.     
  606.     rem   RSU.PRG file
  607.     
  608.     rem   First determine whether the user already has the
  609.       latest version:
  610.     
  611.     If c:\rsu\version.txt Equal f:\rsu\version.txt Then
  612.      echo Your workstation has the latest update level.
  613.      Goto Finish
  614.     End If
  615.     
  616.     rem   Let user know what's going to happen to his
  617.       computer:
  618.     
  619.     type f:\rsu\version.txt
  620.     pause
  621.     
  622.     rem   Modifications to WIN.INI:
  623.     
  624.     IniCopySection f:\rsu\wsimage\win31\win.ini
  625.       c:\win31\win.ini [fonts]
  626.     IniCopySection f:\rsu\wsimage\win31\win.ini
  627.       c:\win31\win.ini [devices]
  628.     IniDeleteSection c:\win31\win.ini [ObscureOldProgram]
  629.     IniCopyLine f:\rsu\wsimage\win31\win.ini c:\win31\win.ini
  630.       [windows] load
  631.     IniDeleteLine c:\win31\win.ini [fonts] Swiss=
  632.     IniChangeLine c:\win31\win.ini [mail] mailbox=%USER%
  633.     
  634.     rem   Modifications to SYSTEM.INI:
  635.     
  636.     IniAddLine c:\win31\system.ini [display] svgamode=98
  637.     
  638.     rem   Synchronization of user files:
  639.     
  640.     SynchronizeDir f:\rsu\wsimage\win31 c:\win31 /a
  641.     SynchronizeDir f:\rsu\wsimage\util  c:\util  /a /o /d /s
  642.     
  643.     rem   Users with HappyVGA adapters get a new driver and
  644.       support
  645.     rem   utilities. This requires that such users have a
  646.       signal file
  647.     rem   c:\rsu\happyvga.sig:
  648.     
  649.     If Exist c:\rsu\happyvga.sig Then
  650.      SynchronizeDir f:\rsu\wsimage\happyvga c:\happyvga /a /o
  651.       /d /s
  652.     End If
  653.     
  654.     rem   Now install version text file to make sure that this
  655.     rem   user doesn't get the same update again:
  656.     
  657.     copy f:\rsu\version.txt c:\rsu
  658.     
  659.     Finish:
  660.     
  661.     rem   End Of File
  662.  
  663.  
  664. Execution Sequence
  665.  
  666. RSU is a pure interpreter. This has consequences especially
  667. when using the Goto command in connection with If, Then, Else
  668. constructs. RSU takes these commands exactly in the sequence
  669. they are processed. This means that a Goto jump into an If
  670. structure can cause unexpected results if the programmer isn't
  671. aware of the actual processing sequence. Therefore it is not
  672. advisable to jump into an If command. Jumping out of an If
  673. command doesn't hurt. The If construct is simply never
  674. completed. But if it is done many times, for example in a loop,
  675. it will eventually cause a memory overflow. You should
  676. therefore try to use the Goto command sparingly and prudently.
  677. Ghastly mistakes can happen if the interpreter encounters, for
  678. example, an Else command after jumping out of an If construct,
  679. because the interpreter would assume that the Else belongs to
  680. the last encountered If command.
  681.  
  682.  
  683.  
  684. Alphabetical List of Commands
  685.  
  686.  
  687. General Command Syntax
  688.  
  689. All control files are text files in which each line is followed
  690. by a carriage return/line feed pair (13dec and 10dec).
  691.  
  692. Spaces and tab characters in the beginning of any line are
  693. totally ignored. In effect it is as if those characters were
  694. removed before executing the RSU.PRG program.
  695.  
  696. Lines beginning with "REM  " or ";" (a semicolon) are comments.
  697.  
  698. Upper and lower case are functionally equivalent. However, the
  699. case is retained when information is forwarded into another
  700. file.
  701.  
  702. Substitutions of environment variables (like %USER%) are done
  703. before the commands are executed.
  704.  
  705. If the first word in any line is a valid RSU command then it is
  706. executed. If not the line is deemed to be a DOS command and is
  707. forwarded to the DOS command processor. Note, however, that not
  708. every DOS command can be used. For example, the DOS command SET
  709. has no effect because it is running under a secondary command
  710. processor that has no access to the primary environment.
  711.  
  712. In the syntax definitions below, a few special characters and
  713. words are used that have a special meaning.
  714.  
  715. A word enclosed in angle brackets is a placeholder for a user
  716. defined, variable entry:
  717.  
  718.     < >
  719.  
  720.  
  721. The following placeholder stands for any valid RSU command:
  722.  
  723.     <command>
  724.  
  725. An ellipsis stands for "more of the same":
  726.  
  727.     ...
  728.  
  729. Braces and vertical bars are used to define a user choice of
  730. one out of several units. Only one can and must be chosen:
  731.  
  732.     { <choice 1> | <choice 2> | <choice 3> }
  733.  
  734.  
  735. Sections
  736.  
  737. Several commands work on sections in .INI files. A section is
  738. recognized by its header. It ends before the next section
  739. header. A section header consists of a section name in
  740. brackets. Examples:
  741.  
  742.     [windows]
  743.  
  744.     [HPPCL5A,LPT1:]
  745.  
  746.     [Microsoft Word]
  747.  
  748. The section header must begin in cloumn 1, i.e. in the leftmost
  749. position of a line. Technically spoken, the opening bracket
  750. must immediately follow the carriage return, line feed pair
  751. that ends the previous line, or it must be the first byte of
  752. the whole file. All lines following the section header belong
  753. to this section until another section header follows.
  754.  
  755. To facilitate manipulation of sections in files like
  756. AUTOEXEC.BAT or CONFIG.SYS, a second, alternative form of
  757. section header is also recognized, which consists of the
  758. abbreviation REM in upper, lower or mixed case, followed by
  759. exactly one space, followed by a section header as described
  760. above. The R in REM must be in the leftmost column. Examples:
  761.  
  762.     REM [drives]
  763.  
  764.     Rem [NETWORK DRIVERS]
  765.  
  766.     rem [User Specific Settings]
  767.  
  768. Hint:  If you want to turn such REM lines into real comments
  769.        rather than RSU section headers, insert at least a
  770.        second space or any other characters between REM and [.
  771.  
  772. Hint:  While all RSU commands will recognize and accept this
  773.        alternative syntax and work on it and in the sections
  774.        thus designated, only the command IniCopySection can
  775.        put such a section header into a file.
  776.  
  777. Warning:    Never use the alternative REM syntax inside an RSU
  778.        command file. All RSU commands work without containing
  779.        the word REM, even if the target files contain it.
  780.  
  781.  
  782. Environment Variables
  783.  
  784. Environment variables can be inserted in any command with the
  785. syntax:
  786.  
  787.     %<environment variable>%
  788.  
  789.  
  790. Example:
  791.     IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=%USER%
  792.  
  793. This example will take the name from the USER= entry in the
  794. environment and substitute it for %USER% before executing the
  795. IniChangeLine command. For example, if the environment contains
  796. an entry reading:
  797.  
  798.     USER=DANIEL
  799.  
  800.  
  801. then the command will be changed to:
  802.  
  803.     IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=DANIEL
  804.  
  805.  
  806. which is useful for example to save users the separate logging
  807. in to Microsoft⌐ Mail.
  808.  
  809. Hint:  Novell Netware 3.11 can place essential system
  810.        information entries in the environment with the SET
  811.        <variable>="<text>" syntax. Example: SET
  812.        USER="%USER_ID"
  813.  
  814.  
  815. DOS Commands
  816.  
  817. Any command found in an RSU program file that is not a valid
  818. RSU command is deemed to be a DOS command. A secondary command
  819. processor (COMMAND.COM) is loaded and the command forwarded to
  820. it and executed.
  821.  
  822. There is no error checking and no logging with DOS commands, so
  823. be careful to test and use them properly.
  824.  
  825.  
  826. Echo
  827.  
  828. This command simply echoes some text on the screen. It works
  829. like the DOS command with the same name. It was incorporated
  830. only to increase speed and to avoid unnecessary empty lines on
  831. screen.
  832.  
  833. Syntax:
  834.     Echo <text>
  835.  
  836. Example:
  837.     Echo RSU is now installing new video drivers...
  838.  
  839.  
  840. Goto
  841.  
  842. This command continues execution of the RSU program file at the
  843. point after the label. The label can be anywhere else in the
  844. program file but has to be in its own line, i.e. no other
  845. command can follow in the line that contains the label.
  846.  
  847. A label must be at least two characters long, not counting the
  848. colon. The reason for this is that c: means change to drive C:,
  849. rather than a label C. Labels may contain letters, digits and
  850. the underscore _. They may not contain spaces, umlauts or any
  851. other special characters.
  852.  
  853. Syntax:
  854.     Goto <label>
  855.     ...
  856.     <label>:
  857.  
  858. Example:
  859.     Goto Finish
  860.     ...
  861.     Finish:
  862.  
  863.  
  864. If
  865.  
  866. This command executes the other commands embedded between If
  867. and End If only if the condition after the If is met.
  868.  
  869. In addition, an Else clause can be inserted. The commands after
  870. the Else and before the final End If are only executed if the
  871. condition after the If is not met.
  872.  
  873. The comparison operators  <  <=  =  >=  >  <>  determine
  874. whether the character string to the left is less than, less or
  875. equal, equal, greater or equal, greater than, unequal to the
  876. string on the right of the operator, ignoring upper or lower
  877. case. Thus  a  =  A  would count as true.
  878.  
  879. The operator "Exist" followed by a filename determines whether
  880. the following file exists, similar to the equivalent DOS batch
  881. command.
  882.  
  883. The operator "Equal" between two filenames determines whether
  884. the two files are exactly equal in size, date and time.
  885.  
  886. A special form is the BIOS search. This allows to search a
  887. certain range of memory addresses within the first megabyte for
  888. a word. The syntax of the If clause is:
  889.     If Bios(<hexadr>-<hexadr> = <text> Then
  890.  
  891. Example:
  892.     If Bios(F000-F100) = AMI Then
  893.       Echo This computer has an AMI Bios.
  894.     End If
  895.  
  896. The BIOS search allows only the equal operator = and cannot be
  897. written with the search word on the left side of the equal
  898. sign. The search is case insensitive. Note also that it is not
  899. possible to write more than one word, because the present
  900. syntax uses the space as a delimiter. You may, however, write
  901. something like this:
  902.     If Bios(C000-C080) = Ati Then
  903.        If Bios(C000-C080) = Ultra Then
  904.           Echo ATi Graphics Ultra found.
  905.        End If
  906.     End If
  907.  
  908. Note that after the If and between any other elements on the
  909. line one or more spaces are needed. Thus it would be wrong to
  910. write:
  911.     If %USER%=DANIEL Then
  912.  
  913. The correct form is:
  914.     If %USER% = DANIEL Then
  915.  
  916. Note also that the two text strings may not contain any spaces
  917. in RSU version 1.1. An If command with a comparison operator
  918. must have exactly 5 words in the line.
  919.  
  920. Syntax (4 different forms):
  921.     If <condition> Then
  922.       <command>
  923.       ...
  924.     End If
  925.     
  926.     If <condition> Then
  927.       <command>
  928.       ...
  929.     Else
  930.       <command>
  931.       ...
  932.     End If
  933.     
  934.     If Not <condition> Then
  935.       <command>
  936.       ...
  937.     End If
  938.     
  939.     If Not <condition> Then
  940.       <command>
  941.       ...
  942.     Else
  943.       <command>
  944.       ...
  945.     End If
  946.     
  947.     <condition> = { <text 1> <comparison operator> <text 2> |
  948.       Exist <filename> | <filename 1> Equal <filename 2> } |
  949.       Bios(<hexadr>-<hexadr>) = <text>
  950.  
  951.     <comparison operator> = { < | <= | = | >= | > | <> }
  952.  
  953.     <hexadr> = 0 .. FFFF
  954.  
  955. Examples:
  956.     If Not %USER% = SUPERVISOR Then
  957.      Goto Finish
  958.     End If
  959.     ...
  960.     Finish:
  961.     
  962.     If Not c:\rsu\version.txt Equal f:\rsu\version.txt Then
  963.      copy f:\rsu\version.txt c:\rsu
  964.      ...
  965.     Else
  966.      echo You already have the latest version. No update
  967.       necessary.
  968.     EndIf
  969.     
  970.     If Not Exist c:\windows\win.ini Then
  971.      echo Your disk is not properly installed. Please follow
  972.      echo the instructions to perform the base installation,
  973.      echo then log on again.
  974.      Goto Get_Out
  975.     End If
  976.     
  977.     If Bios(F000-F200) = Dell Then
  978.        c:\dell\keyb.com gr,,c:\dos\keyboard.sys
  979.       Else
  980.        c:\dos\keyb.com gr,,c:\dos\keyboard.sys
  981.     End If
  982.  
  983. Hint:  End If can be written with or without a space between
  984.        End and If, i.e. either "End  If" or "EndIf". The
  985.        preferred form is: "End  If".
  986.  
  987. Warning:    Between each of two keywords, operators and
  988.        operands one space is required.
  989.  
  990. Warning:    Do not use the Goto command to jump into an If -
  991.        End If structure. Do not use the Goto command to jump
  992.        out of an If - End If structure very many times, for
  993.        example in a loop with a very high number of
  994.        repetitions.
  995.  
  996.  
  997. IniAddLine
  998.  
  999. This command is used to add a line where several lines have the
  1000. same variable name, like for example the device= lines in
  1001. SYSTEM.INI. It appends one further line to the section. If the
  1002. section does not exist it is newly created and appended to the
  1003. .INI file first.
  1004.  
  1005. The only exception occurs if the exact line, variable name and
  1006. text, exists in the file already. In this particular case the
  1007. command has no effect. In other words, the command does not
  1008. produce exact duplicates of whole lines like:
  1009.  
  1010.     device=VPD.386
  1011.     device=VPD.386
  1012.  
  1013. Syntax:
  1014.     IniAddLine <ini file> [<section name>] <variable
  1015.       name>=<text>
  1016.  
  1017. Example:
  1018.     IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=VPD.386
  1019.  
  1020.  
  1021. IniChangeLine
  1022.  
  1023. This command changes the text after the equals sign (=) in a
  1024. certain section and a certain line in an .INI file. If the
  1025. section does not exist it is newly created and appended to the
  1026. .INI file first. If the line does not exist it is newly created
  1027. and appended at the end of the section. If several lines with
  1028. the same variable name exist in the section then this command
  1029. is probably not appropriate and should not be used since it
  1030. would change only one of the lines.
  1031.  
  1032. Syntax:
  1033.     IniChangeLine <ini file> [<section name>]
  1034.       <variable>=<text>
  1035.  
  1036. Example:
  1037.     IniChangeLine C:\WIN31\WIN.INI [windows] load=NWPOPUP.EXE
  1038.  
  1039.  
  1040. Note that there is presently no command to change only part of
  1041. a line. If something like this is desired one possible
  1042. workaround is to use EDLIN in batch mode.
  1043.  
  1044.  
  1045. IniCopyLine
  1046.  
  1047. This command finds a certain line within a section in an .INI
  1048. file and copies it into another .INI file. If a line with the
  1049. same variable name to the left of the equals sign (=) already
  1050. exists it is replaced with the new line. If several lines with
  1051. the same variable name exist in the section then this command
  1052. is probably not appropriate. It will work on the first
  1053. occurrence of the variable. If the section does not exist in
  1054. the target .INI file, it is newly created and appended to the
  1055. .INI file first.
  1056.  
  1057. Syntax:
  1058.     IniCopyLine <source ini file> <target ini file> [<section
  1059.       name>] <variable>
  1060.  
  1061. Examples:
  1062.     IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI
  1063.       [windows] load
  1064.     IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI
  1065.       [windows] load=
  1066.  
  1067.  
  1068. Both example lines do the same thing. Each one would search the
  1069. file F:\RSU\WSIMAGE\WIN31\WIN.INI for the section [windows].
  1070. Within the section it would locate the line beginning with
  1071. load= and copy it into the line with the same section and
  1072. variable name in the file C:\WIN31\WIN.INI.
  1073.  
  1074.  
  1075. IniCopySection
  1076.  
  1077. This command works similar to the previous one but copies a
  1078. whole section. If a section with the same name already exists
  1079. in the target file, it is deleted and the new section copied
  1080. and inserted in its place. IniCopySection also inserts an empty
  1081. line before and after the section if there was none, to make
  1082. the file easier to read and conform with the usual practice in
  1083. Windows .INI files.
  1084.  
  1085. Syntax:
  1086.     IniCopySection <source ini file> <target ini file>
  1087.       [<section name>]
  1088.  
  1089. Example:
  1090.     IniCopySection F:\RSU\WSIMAGE\WIN31\WIN.INI
  1091.       C:\WIN31\WIN.INI [HPPCL5A,LPT1:]
  1092.  
  1093.  
  1094. This example would copy the whole section [HPPCL5A,LPT1:] from
  1095. F:\RSU\WSIMAGE\WIN31\WIN.INI to C:\WIN31\WIN.INI. If there was
  1096. a section with that name before it will be overwritten and all
  1097. information lost entirely. If the previous section contained
  1098. more or other lines than the new those old lines will be lost.
  1099.  
  1100.  
  1101. IniDeleteLine
  1102.  
  1103. This command deletes a line in an .INI file.
  1104.  
  1105. Syntax:
  1106.     IniDeleteLine <ini file> [<section name>] <variable>
  1107.  
  1108. Examples:
  1109.     IniDeleteLine C:\WIN31\WIN.INI [mail] Polling
  1110.     IniDeleteLine C:\WIN31\WIN.INI [mail] Polling=
  1111.  
  1112.  
  1113. This example will search C:\WIN31\WIN.INI for the section
  1114. [mail] and in this section for the line beginning with
  1115. Polling=. This line will be deleted from WIN.INI.
  1116.  
  1117.  
  1118. IniDeleteSection
  1119.  
  1120. Syntax:
  1121.     IniDeleteSection <ini file> [<section name>]
  1122.  
  1123. Example:
  1124.     IniDeleteSection C:\WIN31\WIN.INI [Microsoft Word]
  1125.  
  1126.  
  1127. Both example lines do the same thing. Each one will search
  1128. C:\WIN31\WIN.INI for the section [Microsoft Word]. The entire
  1129. section will be deleted from WIN.INI.
  1130.  
  1131.  
  1132. SynchronizeDir
  1133.  
  1134. Makes the target directory equal to the source directory
  1135. including all files, but excepting all files that have a read-
  1136. only, hidden or system attribute.
  1137.  
  1138. SynchronizeDir handles all files regardless of their
  1139. attributes. Attributes are copied with each file.
  1140.  
  1141. The SynchronizeDir command requires switches to control its
  1142. operation. The following switches can be used, and at least one
  1143. of them has to be used, otherwise SyncDir will not do anything:
  1144.  
  1145. /D     Delete files from the target directory if they don't
  1146.        exist in the source directory.
  1147.  
  1148. /A     Add files to the target directory if they are not there
  1149.        already.
  1150.  
  1151. /O     Overwrite files in the target directory if they also
  1152.        exist in the source directory but are different (have
  1153.        different size, date or time). This switch may not be
  1154.        used together with the /C switch.
  1155.  
  1156. /C     Conflict management. This switch may not be used
  1157.        together with the /O switch. If a file name exists in
  1158.        both source and target directories but with different
  1159.        size, date or time, then this is considered a conflict
  1160.        and the following actions are taken:
  1161.        
  1162.        1. Both files are put into the target directory and
  1163.           the older one gets a new name like !SYNnnnn.xxx where
  1164.           nnnn is a number between 0001 and 9999 and xxx is the
  1165.           original extension of the file.
  1166.        
  1167.        2. A line is appended to the file !SYN0000.TXT in
  1168.           the target directory containing the date, time and
  1169.           conflicting file information separated by semicolons
  1170.           (;), ready for import into a conflict database.
  1171.  
  1172.        One possible purpose of this function is to allow users
  1173.        with portable PCs to copy their network user
  1174.        directories home with them and later reconciliate their
  1175.        local user directories with those on the network if
  1176.        both can have changed.
  1177.  
  1178. Warning:    SynchronizeDir will overwrite or erase files with
  1179.        any attributes in the target directory and, with the /S
  1180.        switch, any of its subdirectories, even if they are
  1181.        read-only, hidden or system files.
  1182.  
  1183. Syntax:
  1184.     SynchronizeDir <source directory> <target directory> [/D]
  1185.       [< /O | /C >] [/A] [/S]
  1186.  
  1187. Examples:
  1188.     SynchronizeDir F:\RSU\WSIMAGE\U C:\U /D /O /A /S
  1189.     SynchronizeDir F:\RSU\WSIMAGE\DOS C:\DOS /O /A
  1190.  
  1191.  
  1192. The first line would make the directory C:\U and all of its
  1193. subdirectories exactly equal to the directory F:\RSU\WSIMAGE\U
  1194. and all of its subdirectories.
  1195.  
  1196. The second would overwrite any files in C:\DOS that are
  1197. different from their namesakes in F:\RSU\WSIMAGE\DOS. It would
  1198. also add files that are missing in C:\DOS, but it would not
  1199. delete or otherwise touch any additional files the user may
  1200. have added to his DOS directory. It would also not touch any
  1201. subdirectories of C:\DOS.
  1202.  
  1203.  
  1204. _______________________________
  1205.  
  1206. 1 The term "workstation" is used here for all user PC's
  1207. connected to the network, using DOS, not for engineering
  1208. workstations running Unix or the like.
  1209.  
  1210. 2 Another method is to run it each time the workstation is
  1211. started, from the AUTOEXEC.BAT file. Since users have few
  1212. rights on the file server at that time it would be necessary to
  1213. adjust those rights such that all users have reading rights to
  1214. all RSU data without being logged in. This may or may not be
  1215. possible on different network operating systems.
  1216.